/**
 * futures : masterlink.futures.form.FuturesVirtualForm.java
 */
package masterlink.futures.form;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2012/6/15
 * @version 1.0.0	
 */
public class OptionVirtualForm {
	
	private String broker;
	private String acno;
	private String name;
	private String trid;
	private int month;
	private String buySell;
	private String cp;
	private int strikPrice;
	private long count;
	private double price;
	/**
	 * @return the broker
	 */
	public String getBroker() {
		return broker;
	}
	/**
	 * @param broker the broker to set
	 */
	public void setBroker(String broker) {
		this.broker = broker;
	}
	/**
	 * @return the acno
	 */
	public String getAcno() {
		return acno;
	}
	/**
	 * @param acno the acno to set
	 */
	public void setAcno(String acno) {
		this.acno = acno;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the trid
	 */
	public String getTrid() {
		return trid;
	}
	/**
	 * @param trid the trid to set
	 */
	public void setTrid(String trid) {
		this.trid = trid;
	}
	/**
	 * @return the month
	 */
	public int getMonth() {
		return month;
	}
	/**
	 * @param month the month to set
	 */
	public void setMonth(int month) {
		this.month = month;
	}
	/**
	 * @return the buySell
	 */
	public String getBuySell() {
		return buySell;
	}
	/**
	 * @param buySell the buySell to set
	 */
	public void setBuySell(String buySell) {
		this.buySell = buySell;
	}
	/**
	 * @return the cp
	 */
	public String getCp() {
		return cp;
	}
	/**
	 * @param cp the cp to set
	 */
	public void setCp(String cp) {
		this.cp = cp;
	}
	/**
	 * @return the strikPrice
	 */
	public int getStrikPrice() {
		return strikPrice;
	}
	/**
	 * @param strikPrice the strikPrice to set
	 */
	public void setStrikPrice(int strikPrice) {
		this.strikPrice = strikPrice;
	}
	/**
	 * @return the count
	 */
	public long getCount() {
		return count;
	}
	/**
	 * @param count the count to set
	 */
	public void setCount(long count) {
		this.count = count;
	}
	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}
	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("OptionVirtualForm [broker=");
		builder.append(broker);
		builder.append(", acno=");
		builder.append(acno);
		builder.append(", name=");
		builder.append(name);
		builder.append(", trid=");
		builder.append(trid);
		builder.append(", month=");
		builder.append(month);
		builder.append(", buySell=");
		builder.append(buySell);
		builder.append(", cp=");
		builder.append(cp);
		builder.append(", strikPrice=");
		builder.append(strikPrice);
		builder.append(", count=");
		builder.append(count);
		builder.append(", price=");
		builder.append(price);
		builder.append("]");
		return builder.toString();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((acno == null) ? 0 : acno.hashCode());
		result = prime * result + ((broker == null) ? 0 : broker.hashCode());
		result = prime * result + ((buySell == null) ? 0 : buySell.hashCode());
		result = prime * result + (int) (count ^ (count >>> 32));
		result = prime * result + ((cp == null) ? 0 : cp.hashCode());
		result = prime * result + month;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		long temp;
		temp = Double.doubleToLongBits(price);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + strikPrice;
		result = prime * result + ((trid == null) ? 0 : trid.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OptionVirtualForm other = (OptionVirtualForm) obj;
		if (acno == null) {
			if (other.acno != null)
				return false;
		} else if (!acno.equals(other.acno))
			return false;
		if (broker == null) {
			if (other.broker != null)
				return false;
		} else if (!broker.equals(other.broker))
			return false;
		if (buySell == null) {
			if (other.buySell != null)
				return false;
		} else if (!buySell.equals(other.buySell))
			return false;
		if (count != other.count)
			return false;
		if (cp == null) {
			if (other.cp != null)
				return false;
		} else if (!cp.equals(other.cp))
			return false;
		if (month != other.month)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (Double.doubleToLongBits(price) != Double
				.doubleToLongBits(other.price))
			return false;
		if (strikPrice != other.strikPrice)
			return false;
		if (trid == null) {
			if (other.trid != null)
				return false;
		} else if (!trid.equals(other.trid))
			return false;
		return true;
	}
}
